<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src='ajax.js'></script>
<script>
	window.onload=function()
	{
		var oBtn = document.getElementById('btn1');
		
		oBtn.onclick=function()
		{
			ajax('a.txt?t='+ new Date().getTime(),function(str){
				alert(str);
			},function(){
				alert('fail');
			});
		}
	}
</script>

</head>

<body>
	<input type="button" id ='btn1' value = '读取'>
</body>
</html>


